package ex.com.jm.food.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
/**
 * 订单详情实体层
 * @author zhaojw
 *
 */
@Entity
@Table(name="jm_orderItem")
public class OrderItem implements Serializable {

	
	private static final long serialVersionUID = 1L;
	@Id
	@GenericGenerator(name="orderitem_id",strategy="uuid")
	@GeneratedValue(generator="orderitem_id")
	@Column(name="orderitem_id",nullable=false,unique=true,length=32)
	private String orderItemId;//订单详情主键
	@Column(name="menu_id",nullable=false,length=32)
	private String menuId;//菜品id
	@Column(name="menu_name",nullable=false,length=32)
	private String menuName;
	@Column(name="menu_nowPrice",nullable=false,length=32)
	private Double menuNowPrice;
	@Column(name="profit",nullable=false,length=11)
	private Double profit;
	@Column(name="menu_num",nullable=false,length=11)
	private Integer menuNum;//菜品订购数量
	@ManyToOne
	@JoinColumn(name="order_id")
    private Order orderId;//订单id
	public String getOrderItemId() {
		return orderItemId;
	}
	public void setOrderItemId(String orderItemId) {
		this.orderItemId = orderItemId;
	}
	public String getMenuId() {
		return menuId;
	}
	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}
	public Integer getMenuNum() {
		return menuNum;
	}
	public void setMenuNum(Integer menuNum) {
		this.menuNum = menuNum;
	}
	public Order getOrderId() {
		return orderId;
	}
	public void setOrderId(Order orderId) {
		this.orderId = orderId;
	}
	public String getMenuName() {
		return menuName;
	}
	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	public Double getMenuNowPrice() {
		return menuNowPrice;
	}
	public void setMenuNowPrice(Double menuNowPrice) {
		this.menuNowPrice = menuNowPrice;
	}
	public Double getProfit() {
		return profit;
	}
	public void setProfit(Double profit) {
		this.profit = profit;
	}
}
